<?php
namespace app\common\model;

use think\Model;
use app\common\model\Exhibition;

class Exhibition extends Model
{

    public function countryInfo()
    {
        return $this->hasOne('Property', 'id', 'country_id');
    }
    
    public function industryInfo()
    {
        return $this->hasOne('Property', 'id', 'industry_id');
    }

    public function detail($id)
    {

        $where = [
            ['status' ,'eq', 1],
            ['id' ,'eq', $id]
        ];
        $result = $this->where($where)->find();
        return $result;
    }
 
}